#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int digitsum(int n)
{
	while (n != 0)
	{
		return n % 10 + digitsum(n / 10);
	}
	return 0;
}
int main()
{
	printf("%d",digitsum(1923));
	return 0;
}